package com.lms.logisticsmanagementsystem.mapper;

import com.lms.logisticsmanagementsystem.model.Car;
import com.lms.logisticsmanagementsystem.model.Driver;
import com.lms.logisticsmanagementsystem.model.Staff;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface CarMapper {
    List<Car> getCarInfo();

    Integer addCarInfo(Car car);

    Car getCarInfoById(@Param("id") Integer id);

    Integer delCarInfoById(@Param("id") Integer id);

    List<String> getAllCphm();

    List<String> getCphmSelect();

    Integer addDriverInfo(Driver driver);

    List<Driver> getDriverInfo();

    Driver editDriverInfoById(@Param("id") Integer id);

    Integer delDriverInfoById(@Param("id") Integer id);

    List<String> getCarInfoByClassAndZT();

    List<Car> getCarBHByCLX(@Param("clx") String clx);

    List<Driver> getDriverInfoByZT();

    Car getCarInfoByCBH(@Param("cbh") String carCheck);

    Integer updateCarInfoByCBH(Car car);

    Integer updateDriverStatusById(Driver driver);

    Integer updateCarStatusByCBH(@Param("clbh") String clbh);

    Integer updateDriverStatusByPhoneAndXM(@Param("sjxm") String sjxm, @Param("sjdh") String sjdh);

    Integer editDriverById(Driver driver);

    Integer editCar(Car car);

    List<Car> getCarInfoByCarNum(@Param("carNum") String carNum);

    List<Driver> getDriverInfoByDriverTip(@Param("drivertip") String drivertip);
}
